/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package acceso.util;

import java.util.List;

/**
 *
 * @author romulogalindo
 */
public class Service {

    static ServiceManager manager = new ServiceManager();
    public Service() {
        
        //leer de properties()
        //lanzar cada tarea con try-catch()
        
    }
    
    public static void cargar(){
        //Cargando tareas a cargar
        manager.cargar();
    }
    
    public static void iniciar(){
        List tareas = manager.get_tareas(); 
        
        for(int i = 0 ; i <tareas.size();i++){
            Tarea t = (Tarea)tareas.get(i);
            manager.add_task(t.getTask(), t.getDelay(),t.getPeriodo());
        }
    }
    
    public static void detener(){
        manager.detener();
    }
    
}
